<%--
  Created by IntelliJ IDEA.
  User: TT
  Date: 2020/7/31
  Time: 15:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>联系我们</title>
    <link rel="stylesheet" href="../css/contactus.css">
<%--    <script src="../js/jquery-3.4.1.min.js"></script>--%>
<%--    <script src="../js/common.js"></script>--%>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <script type="text/javascript" src="//api.map.baidu.com/api?v=3.0&ak=rF5dauijCWFq1RyFMOAT0UP3y25iYrKc"></script>
</head>
<body>
<!--头部-->
<jsp:include page="top.jsp"></jsp:include>
<!--中间部分-->
<div class="contactus-moddle">
    <div>
        <div>${aboutModle.onea}</div>
        <div><p>${aboutModle.oneb}</p></div>
        <div><p>${aboutModle.onec}</p></div>
        <div><p>${aboutModle.oned}</p></div>
    </div>
    <div>
        <div><p>${contactusModel.onea}</p></div>
        <div><p>${contactusModel.oneb}</p></div>
        <div>
            <p>${contactusModel.onec}</p>
        </div>
    </div>
    <div>
        ${contactusModel.twoa}
        <div>
            查看地图地址
        </div>
    </div>
    <div id="allmap"></div>
</div>
<!--底部-->
<jsp:include page="foot.jsp"></jsp:include>
</body>
</html>
<script type="text/javascript">
    var map = new BMap.Map('allmap');
    var point = new BMap.Point(104.112893,30.715855);
    map.centerAndZoom(point, 12);
    map.enableScrollWheelZoom(true);
    // 覆盖区域图层测试
    map.addTileLayer(new BMap.PanoramaCoverageLayer());

    var stCtrl = new BMap.PanoramaControl(); //构造全景控件
    stCtrl.setOffset(new BMap.Size(20, 20));
    map.addControl(stCtrl);//添加全景控件
    var marker = new BMap.Marker(point);  // 创建标注
    map.addOverlay(marker);              // 将标注添加到地图中
    // map.centerAndZoom(point, 15);
    var opts = {
        width : 200,     // 信息窗口宽度
        height: 100,     // 信息窗口高度
        title : "动物园" , // 信息窗口标题
        enableMessage:true,//设置允许信息窗发送短息
        message:"亲耐滴，晚上一起吃个饭吧？戳下面的链接看下地址喔~"
    }
    var infoWindow = new BMap.InfoWindow("地址：北京市东城区王府井大街88号乐天银泰百货八层", opts);  // 创建信息窗口对象
    marker.addEventListener("click", function(){
        map.openInfoWindow(infoWindow,point); //开启信息窗口
    });
</script>
